<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport" />
<meta name="apple-mobile-web-app-capable" content="yes">
<meta content="telephone=no" name="format-detection">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<!--<link href="/css/common.css" rel="stylesheet" />-->
<link rel="shortcut icon" href=" " type="image/x-icon" />
<link rel="shortcut icon" href=" " type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="{$static}/bootstrap/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="{$home}/css/type_lists.css">

<link href="{$home}/css/fang/list.css" rel="stylesheet">

<link rel="stylesheet" type="text/css" href="{$home}/css/fang/paging.css">
<link rel="stylesheet" type="text/css" href="{$home}/css/fang/component.css"> 
<link rel="stylesheet" type="text/css" href="{$home}/css/fang/modal.min.css">
 
<title>君忆机构</title>
 <style>
  .sj-order{
    display: inline-block;
}
.rotate{
    transform-origin:center center; //旋转中心要是正中间 才行
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
    -moz-transform: rotate(180deg);
    -ms-transform: rotate(180deg);
    -o-transform: rotate(180deg);
    transition: transform 0.2s; //过度时间 可调
    -moz-transition: -moz-transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -o-transition: -o-transform 0.2s; 
    -ms-transition: -ms-transform 0.2s; 
}
.rotate1{
    transform-origin:center center;
    transform: rotate(0deg); //返回原点
    -webkit-transform: rotate(0deg);
    -moz-transform: rotate(deg);
    -ms-transform: rotate(0deg);
    -o-transform: rotate(0deg);
    transition: transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -moz-transition: -moz-transform 0.2s; 
    -o-transition: -o-transform 0.2s; 
    -ms-transition: -ms-transform 0.2s; 
}
.fasten li{ box-sizing: border-box; }
.fasten li:hover{ background: #FFF4B2 }
.form-horizontal .form-group{ margin:0 60px; }
.yz-code{  cursor:pointer;}
.yz-code:hover{ background: #ddd; }
.btn:focus,
.btn:active:focus,
.btn.active:focus,
.btn.focus,
.btn:active.focus,
.btn.active.focus {
    outline: none;
}
#head-div{
  border-bottom: 0.5px solid #e6e6e6;
}
 
 
</style>

 
</head>
<body>


<!--弹出层  -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document" >
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h3 class="modal-title" id="myModalLabel">手机快捷登录</h3>
      </div>
      <div class="modal-body ">
        
            <br>
            <br>
            <br>
             
        
        <div class="form-group " >
         
          
         <div class="input-group" >
        
           <span class="input-group-addon">+86</span>
           <input type="text" class="form-control input-lg" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status" placeholder="请输入手机号">
         </div>
        <br>
         <div class="input-group" >
           <input type="text" class="form-control input-lg" id="inputGroupSuccess3" aria-describedby="inputGroupSuccess3Status" placeholder="请输入手机号">
          <span class="input-group-addon yz-code">获取验证码</span>
         </div>
         
         <!-- <span class="glyphicon glyphicon-ok form-control-feedback" aria-hidden="true"></span> -->
         <span id="inputGroupSuccess3Status" class="sr-only">(success)</span>
        </div>
        
         
      
    
      </div>
      <div class="modal-footer">
        
        <button type="button " class="btn btn-lg btn-block" style="background:#ffdc00 ">登录</button>
      </div>
    </div>
  </div>
</div>  

<div class="hidden-sm hiddem-md hidden-lg fn-hide box-flex v-center" id="download">
<div class="close ft-center j-close v-center">
<img src=" //assets.souche.com/projects/finance/vanille/images/common/close-bar-dark.png?BIU=27cc1b713da0164d0497c872df7fc2e2 " width="8" alt="">
</div>
<div class="flex-1">
<div class="ft-16"> 弹个车APP </div>
<div class="ft-sm ft-gray3">首付低至10%，1年后可买可退</div>
</div>
<div class="ft-center j-start-download flex-1">
<div class="d-sbtn"> 下载APP </div>
</div>
</div><div class="nav-mask" id="header-mask-div">
<div class="mask"></div>
<!-- 折叠导航 -->
<div class="row">
<div class="col-md-8 col-sm-8 col-xs-8 col-md-offset-4 col-sm-offset-4 col-xs-offset-4 nav-right">
<ul class="menu-list ft-16">
<li><a href="{url('home/index/index')}">首页</a></li>
<li><a href="{url('home/Type/lists')}" class=""><span>我要买车</span></a></li>
<li class="j-usedCar fn-hide"><a href="javascript:;">弹二手车</a></li>
</ul>
<div class="border-bottom"></div>
<ul class="menu-list ft-16">
<li><a href="javascript:;">下载应用</a></li>
<li><a href="javascript:;">什么是弹个车</a></li>
<li><a href="javascript:;" class="jlogin j-login-btn">登录</a></li>
</ul>
<div class="border-bottom"></div>
<ul class="menu-list ft-16">
<li><a href="javascript:;">常见问题</a></li>
<li><a href="javascript:;">关于大搜车</a></li>
</ul>
</div>
</div>
<!-- 折叠导航end -->
</div><div class="container-fluid border-bottom" id="head-div">
<div class="nav">
<div class="row">
<div class="col-md-3 col-sm-2 col-xs-3" style="margin-top:13px;">
<h1 style="display:table-cell;">
<a href="{url('home/Index/index')}">
<img class="header-logo" src="{$home}images/header-logo.png" height="36" alt="弹个车">
</a>
</div>
</h1>
<div class="pull-right hidden-sm hidden-md hidden-lg menu" id="menu-icon">
<img src="{$home}images/menu-ico.png" alt="">
</div>
<div class="col-md-9 col-sm-10 col-xs-9 hidden-xs">
<ul class="nav-right nav-active">
  <li class="active">
  <a href="{url('home/Type/lists')}" class="">
  <span>我要买车</span>
  </a>
  </li>
  <li class="j-usedCar fn-hide ">
  <a href="">弹二手车</a>
  </li>
  <li id="app-downLoad">
  <a href="javascript: void(0);">下载应用</a>
  <div class="qrcode">
  <img src="{$home}/images/QR.png" width="93" alt="">
  <div class="ft-16">下载手机APP</div>
  </div>
  </li>
  <li class="">
  <a href="">什么是弹个车</a>
  </li>
  <li class="">
  <a href="">常见问题</a>
  </li>
  <li>
  <a href="javascript:void(0);" class="login j-login-btn">登录</a>
  </li>
</ul>
</div>
</div>
</div>
</div>
<div class="container box-flex content">
<div class="left" id="left-div">
<div class="carbrand" >
<div class="search-title ft-weight">品牌</div>
<div class="row" id="brand-model" style="max-height:227px;overflow: hidden; ">


<a href="javascript:;" class="brand-icon  " data-code="" id="typeAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="ft-center">
<div class="sbtn j-sbtn active" style="background-image:url('//img.souche.com//f2e/af82b266a43961d39b3dd855f1d3028e.png');">
</div>
<div class="brand-text"  style="color: #222;text-decoration: none;"> 全部 </div>
</div>
</a>
<!-- 循环品牌 -->
<span id="type-name">
{foreach $tpyeLists as $value}
<a class="brand-icon type-id-{$value.type_id} show-all"  href="javascript:typeId({$value.type_id})" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="ft-center">
<div class="sbtn j-sbtn"  style="background-image:url('{$absroot}{$value.type_pic}');">
</div>
<div class="brand-text " style="color: #222;"> {$value.type_name} </div>
</div>
</a>
{/foreach}
</span>

<!-- 循环品牌end -->


</div>

</div>
<div class="ft-blue more pull-right pointer ft-sm" id="more-brand-btn" style="margin-right: -12px;">更多品牌</div>
<!-- 首付pc -->
<div class="prepaidAmount" style="margin-top: 30px;">
<div class="search-title ft-weight"> 首付 </div>
<div class="row" id="prepaidAmount-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 " data-code="" id="paymentAll" onfocus="this.blur();" style="text-decoration:none;cursor:default;">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span class="goods-payment">
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="0-10000">
  <div class="sbtn j-sbtn ">
  <span>1万以内</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="10000-20000">
  <div class="sbtn j-sbtn ">
  <span>1-2万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="20000-30000">
  <div class="sbtn j-sbtn ">
  <span>2-3万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="30000-40000">
  <div class="sbtn j-sbtn ">
  <span>3-4万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="40000-50000">
  <div class="sbtn j-sbtn ">
  <span>4-5万</span>
  </div>
  </a>
  <a href="javascript:;" onfocus="this.blur();" style="text-decoration:none;cursor:default;" class="col-md-6 col-sm-6 col-xs-6 " data-code="50000-100000000000">
  <div class="sbtn j-sbtn ">
  <span>5万以上</span>
  </div>
  </a>
</span>
</div>
</div>
<!-- 首付pc_end -->

<div class="installment">
<div class="search-title ft-weight"> 月供 </div>
<div class="row" id="installment-model">
<a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="ygAll">
<div class="sbtn j-sbtn active">
<span>全部</span>
</div>
</a>
<span id="ygMonny">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="0-1000">
  <div class="sbtn j-sbtn ">
  <span>1000元以内</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="1000-2000">
  <div class="sbtn j-sbtn ">  
  <span>1000-2000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="2000-3000">
  <div class="sbtn j-sbtn ">
  <span>2000-3000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="3000-4000">
  <div class="sbtn j-sbtn ">
  <span>3000-4000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="4000-5000">
  <div class="sbtn j-sbtn ">
  <span>4000-5000元</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="5000-10000">
  <div class="sbtn j-sbtn ">
  <span>5000元以上</span>
  </div>
  </a>
</span>
</div>
</div>
<div class="carShapeCode">
<div class="search-title ft-weight"> 车型 </div>
<div class="row" id="carShapeCode-model">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="" id="modelAll">
  <div class="sbtn j-sbtn active">
  <span>全部</span>
  </div>
  </a>
<span id="carModel">
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="微小型车">
  <div class="sbtn j-sbtn ">
  <span>微小型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="紧凑型车">
  <div class="sbtn j-sbtn ">
  <span>紧凑型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中型车">
  <div class="sbtn j-sbtn ">
  <span>中型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="中大型车">
  <div class="sbtn j-sbtn ">
  <span>中大型车</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="SUV">
  <div class="sbtn j-sbtn ">
  <span>SUV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="MPV">
  <div class="sbtn j-sbtn ">
  <span>MPV</span>
  </div>
  </a>
  <a href="javascript:;" class="col-md-6 col-sm-6 col-xs-6 j-select-item" data-code="跑车">
  <div class="sbtn j-sbtn ">
  <span>跑车</span>
  </div>
  </a>
</span>
</div>
</div>
<div class="search-btn box-flex ft-center hidden-md hidden-lg">
<div class="reset border-top" id="reset-btn">重置</div>
<div class="search-view flex-1" id="sure-btn">查看75条车</div>
</div>
</div>
<div class="right flex-1" id="search-div">
<!--搜索框-->
<div class="search-box box-flex ft-sm">
<div class="flex-1 search">
<img src="{$home}/images/search-ico.png" width="16" alt="">
<input type="text" placeholder="搜索品牌或车系" value="" id="search-input">
<ul class="search-list fn-hide" id="mask-search">

</ul>
</div>
<div class="search-right box-flex">
<div class="flex-1 hidden-md hidden-lg">
<div class="flex-1 border-left filter" id="filter-li">
<span class="hidden-xs">条件筛选</span>
<img src=" //assets.souche.com/projects/finance/vanille/images/common/filter-ico.jpg?BIU=5059245a050be3d7834a5bcd70005535 " width="16" alt="">
</div>
</div>
<div class="flex-1">
<div class="search-select">
<!-- pc -->
<div class="desc-default border-left">
<span class="hidden-xs" id="sortName">默认排序</span>
<img class="hidden-xs sj-order" src="{$home}images/pc_black_arrow.png" width="8" alt="">
<img class="hidden-md hidden-sm hidden-lg" src="" width="16" alt="">
</div>
 

<!-- mobile -->
<ul class="fasten" style="margin-top: 5px;border-top: 1px solid #ccc">
<li class="sort default"> <span>默认排序</span> </li>
<li class="sort desc"> <span>首付最低</span> </li>
<li class="sort"> <span>首付最高</span> </li>
</ul>
 
</div>
</div>
</div>
</div>
<!--没有数据时显示-->
<div class="no-car ft-center fn-hide" id="no-car-div">
  <div class="row">
  <div class="col-md-12">
  <img src=" //assets.souche.com/projects/finance/vanille/images/common/h5_none_car.png?BIU=81ff4aea5548f14d2ebf5740036208dc " width="72" alt="">
  <p></p>
  <div class="ft-gray3 ft-16">暂无相关车辆</div>
  <div class="ft-gray3 ft-16">想弹什么车，告诉我们</div>
  <div class="sbtn intention intention-car" data-modal="modal-1">填写意向车型</div>
  </div>
  </div>
</div><div class="list" id="carlist-div">
<!-- pc -->

<span id="goods-name">

</span>
<!-- pc_end -->


<!-- 移动端 -->
{foreach $typeAttribute as $typeVal}
<div class="hidden-md hidden-lg hidden-sm car-item j-car-item" data-type-name="{$typeVal.type_name}">
<div class="item box-flex border-bottom">
<div class="car-image" style="background-image: url({$absroot}{$typeVal.goods_pic});"></div>
<div class="flex-1">
<div class="car-info">
<div class="title ft-ellipsis">{$typeVal.goods_name} </div>
<div class="ft-sm ft-ellipsis"> {$typeVal.goods_model}款  {$typeVal.goods_describe} {$typeVal.goods_car}</div>
<div class="price ft-orange ft-sm">
首付
<span class="ft-weight">  {$typeVal.goods_payment}</span> 万&nbsp;
<img src="//assets.souche.com/projects/finance/vanille/images/list/list_line_3x.png?BIU=7df58a9e9ae1a1b79ae2fcf75c2ca488" height="10" alt="">&nbsp;
月供{$typeVal.goods_month}元
</div>
<div class="ft-gray3 ft-sm">指导价 {$typeVal.goods_price}万起</div>
</div>
</div>
</div>
</div>
{/foreach}
<!-- 移动端end -->


</div>
<div class="pagination ft-center hidden-xs">

 
</div>
<div id="intention-2">
<div class="box" id="box"></div>
<div id="intention-show">
<div class="m-height hidden-xs">
<p class="ft-center ft-gray" id="word_to_you">想弹什么车，告诉我们</p>
<!-- <p class="ft-center ft-gray" class="word_to_you_all">想弹什么车，告诉我们</p> -->
<div class="sbtn intention intention-car" > 填写意向车型 </div>
</div>
<div class="hidden-md hidden-lg hidden-sm ft-center m-height intention-car">想弹什么车告诉我们，<span class="ft-orange">帮您找</span>
<img src="//assets.souche.com/projects/finance/vanille/images/detail/h5_orangearrow.png?BIU=e44046d1fcdb485c605662b843dab7a0" width="7" alt="">
</div>
</div>
<div id="loading" class="fn-hide ft-center m-height ft-gray">正在加载更多数据...</div>
</div>
</div>
</div>


 

<script type="text/javascript" src="{$static}jquery-1.11.1.min.js"></script>
<script type="text/javascript" src="{$static}/bootstrap/js/bootstrap.js"></script>
<script src="{$home}js/fang/common.js"></script>
<!--  -->
<script type="text/javascript" src="{$home}js/fang/paging.js"></script>
<script type="text/javascript" src="{$home}js/fang/modal.min.js"></script>

<!-- <script src="{$home}js/fang/common.js"></script> -->
<script type="text/javascript">
/*  $(".nav-active").find('li').mouseover(function(){
      $(this).addClass('li-eee');
      
    })*/

 
var jsonObj = '{$typeAttributes}';//获取json
  jsonObj = eval("("+jsonObj+")");//json转js对象



 $('#box').paging({
     initPageNo: 1, // 初始页码
     totalPages: 30, //总页数
     totalCount: '合计300条数据', // 条目总数
     slideSpeed: 600, // 缓动速度。单位毫秒 
     callback: function(page) { // 回调函数 
         // console.log(page);
     }
 })
//搜索
 $(function() {
     var usercenter = {
     
 init:function(){
     this.modal();
     
 },
     modal: function() {
         $(".desc-default").click(function(){  
          if($('.fasten').css('display')=='none'){
        $('.fasten').show();  
          }
          else{
        $('.fasten').hide();  
          } 
          $('.fasten').find('li').each(function(){
            $(this).click(function(){
              $('#sortName').text($(this).find('span').text());
              $(this).css({ "background":"#ffdc00"});
              $(this).siblings('li').css({ "background":"#FFF"});
              $('.fasten').hide();  
              console.log($(this).find('span').text());
            })
            if($(this).attr('background')=='#ffdc00'){
              $(this).hover(function(){
                alert(1);
                $(this).css({ "background":"#FFF4B2"});
              })
            }

          })
                              
      if($(this).find('.sj-order').hasClass("rotate")){ //点击箭头旋转180度
        $(this).find('.sj-order').removeClass("rotate");
        $(this).find('.sj-order').addClass("rotate1");
      }else{
        $(this).find('.sj-order').removeClass("rotate1"); //再次点击箭头回来
        $(this).find('.sj-order').addClass("rotate");
      }
         })
     
     }
 }
     usercenter.init();

      
 })
//想弹什么

 $(document).ready(function(){
  $('.intention-car,.j-login-btn').click(function(){
    $("#myModal").modal('show');
  })
});

 $('.search-select').blur(function(){
    alert(1);
       
     })
//搜索输入值时
$('.search').keyup(function(){
      $(this).find('ul').removeClass('fn-hide');

    var searVal = $(this).find('input[type="text"]').val();
    console.log(searVal);


 })
  //搜索失去、获得焦点时
    $('.search').find('input[type="text"]').blur(function(){
    
    $('.search').find('ul').addClass('fn-hide');
    })
    $('.search').find('input[type="text"]').focus(function(){
      $('.search').find('ul').removeClass('fn-hide');
  })
  //公用
function jsonAll(jsonObj){


  for(var i in jsonObj){
    var status = '';
      if(jsonObj[i]['goods_status']==1){
         status = '{$home}images/911c604c2ec79bbb990c45303cd8f8ea.png';
      }
    goodsHtml ='<a class="car-item j-car-item hidden-xs type-id-"'+jsonObj[i]["type_id"]+' href="{$absroot}home/Details/lists?goods_id='+jsonObj[i]["goods_id"]+'" data-type-name='+jsonObj[i]["type_name"]+'data-goods-payment='+jsonObj[i]["goods_payment"]+' data-type-goods-month='+jsonObj[i]["goods_month"]+'data-goods-model-car='+jsonObj[i]["goods_model_car"]+'><div class="bg-gray fix-img"style="background-image: url({$absroot}'+jsonObj[i]["goods_pic"]+');"><img src="'+status+'" alt="" class="is_status" ></div><div class="car-text"><div class="car-title ft-ellipsis">'+jsonObj[i]["goods_name"]+'</div><div class="car-title ft-ellipsis ft-sm">'+jsonObj[i]["goods_model"]+'款 '+jsonObj[i]["goods_describe"]+' '+jsonObj[i]["goods_car"]+'</div><div class="car-price ft-sm ft-gray3">指导价'+jsonObj[i]["goods_price"]+'万起</div><div class="car-price ft-orange ft-sm">首付<span class="ft-20 ft-weight">'+jsonObj[i]["goods_payment"]+'</span>万&nbsp;<span class="ft-gray3">月供'+jsonObj[i]["goods_month"]+'元</div></span></div></a>';

      if(jsonObj[i]['sfIsChoosen']=='YES' && jsonObj[i]['typeIsChoosen']=='YES' && jsonObj[i]['ygIsChoosen']=='YES' &&  jsonObj[i]['cxIsChoosen']=='YES' ){
        $('#goods-name').append(goodsHtml);
      }
  }
  if($('#goods-name').html()==''){
  
    $('#no-car-div').removeClass('fn-hide');
    $('#intention-2').hide();
  }else{
    $('#no-car-div').addClass('fn-hide');
    $('#intention-2').show();
  }
}
//页面加载完毕时显示所有数据
 window.onload = function(){ 
  $('#goods-name').html('');
　   jsonAll(jsonObj);
} 

//类别高亮显示
$('#type-name a').each(function(){
    $(this).click(function(){
    $(this).addClass('type-act');
    $(this).siblings('a').removeClass('type-act');
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#typeAll').find('.sbtn').removeClass('active');
  });
});
//类别全选
$('#typeAll').click(function(){
    $(this).find('.sbtn').addClass('active');
    $('#type-name').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').find('a').hide();
    $('#goods-name').find('a').show();
    $('#no-car-div').addClass('fn-hide');

    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['typeIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
//首付全选
$('#paymentAll').click(function(){

  $(this).find('.sbtn').addClass('active');
  $('.goods-payment').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['sfIsChoosen']='YES';
    }
    jsonAll(jsonObj);


})
//月供全选
$('#ygAll').click(function(){
  $(this).find('.sbtn').addClass('active');
  $('#ygMonny').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['ygIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
//车型全选
$('#modelAll').click(function(){
   
  $(this).find('.sbtn').addClass('active');
  $('#carModel').find('a').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){
      jsonObj[i]['cxIsChoosen']='YES';
    }
    jsonAll(jsonObj);

})
 //类别板块事件
 function typeId(typeId){

    $('#goods-name').html('');
    var typeNames = $.trim($('#type-name').find('.type-id-'+typeId).find('.ft-center').find('.brand-text').text());
    for(var i in jsonObj){
        if(jsonObj[i]['type_name']==typeNames){
          jsonObj[i]['typeIsChoosen']='YES';
        }else{
          jsonObj[i]['typeIsChoosen']='NO';
        }
    }
    jsonAll(jsonObj);
 }




 //首付板块事件
$('#prepaidAmount-model').find('.goods-payment').find('a').each(function(){
  $(this).click(function(){
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#paymentAll').find('.sbtn').removeClass('active');
    var goodsPayment = $(this).attr('data-code');//获取左侧选项首付值
      goodsPayment = goodsPayment.split('-');
    $('#goods-name').html('');
     
    for(var i in jsonObj){
        if(parseInt(jsonObj[i]['goods_payment']*10000)<=parseInt(goodsPayment[1]) && parseInt(jsonObj[i]['goods_payment']*10000)>parseInt(goodsPayment[0])){
          jsonObj[i]['sfIsChoosen']='YES';
        }
        else{
          jsonObj[i]['sfIsChoosen']='NO';
        }
    }
    jsonAll(jsonObj);
   })
 })


//月供板块事件
$('#ygMonny').find('a').each(function(){
  
  $(this).click(function(){

    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#ygAll').find('.sbtn').removeClass('active');
    var ygCode = $(this).attr('data-code');
      ygCode = ygCode.split('-');
      console.log(ygCode);
      $('#goods-name').html('');
      for(var i in jsonObj){
       
        if(parseInt(jsonObj[i]['goods_month'])<=parseInt(ygCode[1]) && parseInt(jsonObj[i]['goods_month'])>parseInt(ygCode[0])){

          jsonObj[i]['ygIsChoosen']='YES';
        }
        else{
          jsonObj[i]['ygIsChoosen']='NO';
        }
      }
      jsonAll(jsonObj);

  })
})

//车型板块事件
$('#carModel').find('a').each(function(){
  
  $(this).click(function(){
    var cxCode = $(this).attr('data-code');
    console.log(cxCode);
    $(this).find('.sbtn').addClass('active');
    $(this).siblings('a').find('.sbtn').removeClass('active');
    $('#modelAll').find('.sbtn').removeClass('active');
    $('#goods-name').html('');
    for(var i in jsonObj){

      if(jsonObj[i]['goods_model_car']===cxCode){

        jsonObj[i]['cxIsChoosen']='YES';
      }
      else{
        jsonObj[i]['cxIsChoosen']='NO';
      }
    }
    jsonAll(jsonObj);

  })
})

  



function IsInArray(arr,val){ 
　　var testStr=','+arr.join(",")+","; 
　　return testStr.indexOf(","+val+",")!=-1; 
}  
$('#more-brand-btn').click(function(){
if($('#more-brand-btn').text()=='更多品牌'){
  $('#brand-model').css({ "max-height":""});
  $(this).text('收起品牌');
}
else{
  $(this).text('更多品牌');
  $('#brand-model').css({ "max-height":"227px"});
}
})





 
</script>

</body>
</html>